package com.specificgroup.jira.plugin.acpro.service;

import com.specificgroup.jira.plugin.acpro.exception.AcproException;
import com.specificgroup.jira.plugin.acpro.mapping.*;
import com.specificgroup.jira.plugin.acpro.model.Settings;
import com.specificgroup.jira.plugin.acpro.model.acpro.AcproItemsPage;
import com.specificgroup.jira.plugin.acpro.model.acpro.AcproLoginData;
import com.specificgroup.jira.plugin.acpro.model.acpro.AcproProject;
import com.specificgroup.jira.plugin.acpro.xml.response.generated.ItemType;
import com.specificgroup.jira.plugin.acpro.sync.Sync;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Ivan Holub
 */
public interface AcproManager {

    void buildAcproProjectInfo(Settings settings) throws IOException, AcproException;

    List<AcproProject> getAcproProjects(AcproLoginData acproLoginData) throws IOException, AcproException;

    AcproItemsPage getAcproItemsPage(Settings settings, int pageNumber, int numberOfItemsOnPage) throws IOException, AcproException;

    void acproLogin(AcproLoginData acproLoginData) throws IOException, AcproException;

    UserMappingData prepareUserMapping(Settings settings) throws IOException, AcproException;

    IssueTypeMappingData prepareIssueTypeMapping(Settings settings) throws IOException, AcproException;

    PriorityMappingData preparePriorityMapping(Settings settings) throws IOException, AcproException;

    StatusMappingData prepareStatusMappingData(Settings settings) throws IOException, AcproException;

    ResolutionMappingData prepareResolutionMappingData(Settings settings) throws IOException, AcproException;
    
    ProjectVersionMappingData prepareProjectVersionMapping(Settings settings);

    void setAcproSelectedItems(Settings settings, Map<String, ItemType> itemsMap);

    void startImport(Sync sync, Settings settings);
}
